<ion-header class="mine-home-header">
  <ion-navbar hideBackButton="true">
    <ion-buttons start navPop class="back-buttons">
      <button ion-button clear></button>
    </ion-buttons>

    <ion-title float-left>个人信息</ion-title>
  </ion-navbar>
</ion-header>

<ion-content class="mine-home-section" #content>

  <ion-list>

      <ion-item>
        <div>人脸识别</div>
        <office-camera *ngIf="idInfo"
                       [cameraBackGround]="'assets/img/common/camera.svg'"
                       [imagePaths]="{url: idInfo.livingImg}"
                       [initStatus]="idState?'ONLY_SHOW':'UPLOAD'"
                       (imagesSelected)="getFaceImage($event)"
                       (resetSelected)="resetFaceImage($event)"
        >
        </office-camera>
      </ion-item>

      <ion-item>
        <div>身份证识别</div>
        <office-camera *ngIf="idInfo"
                       [cameraBackGround]="'assets/img/common/frontBg.svg'"
                       [imagePaths]="{url: idInfo.frontImg}"
                       [initStatus]="idState?'ONLY_SHOW':'UPLOAD'"
                       (imagesSelected)="getFrontCard($event)"
                       (resetSelected)="resetFrontCard($event)"
        >
        </office-camera>
        <office-camera *ngIf="idInfo"
                       [cameraBackGround]="'assets/img/common/backBg.svg'"
                       [imagePaths]="{url: idInfo.backImg}"
                       [initStatus]="idState?'ONLY_SHOW':'UPLOAD'"
                       (imagesSelected)="getBackCard($event)"
                       (resetSelected)="resetBackCard($event)"
        >
        </office-camera>
      </ion-item>

      <ion-item>
        <div>姓名</div>
        <input type="text"
               *ngIf="idInfo"
               [value]="idInfo.realname"
               readonly
               placeholder="通过身份证识别自动填充">
      </ion-item>

      <ion-item>
        <div>身份证</div>
        <input type="text"
               *ngIf="idInfo"
               [value]="idInfo.idNo | identity "
               readonly
               placeholder="通过身份证识别自动填充">
      </ion-item>

      <a ion-item class="arrows-right">
        <ion-label>学历</ion-label>
        <ion-multi-picker id="educationGrade"
                          *ngIf="idInfo"
                          [(ngModel)]="initGrade"
                          item-content
                          cancelText="取消"
                          doneText="确定"
                          [multiPickerColumns]="educationGrade"
        ></ion-multi-picker>
      </a>
      <a ion-item (click)="choiceAddress()">
        <h2>现居地址</h2>
        <div *ngIf="address">{{address}}</div>
        <div *ngIf="!address">请选择地址</div>
      </a>
  </ion-list>
  <div class="detail-address">
    <input type="text"
           placeholder="请输入详细地址"
           [(ngModel)]="detailAddress"
    >
  </div>
  <bank-encryption-footer></bank-encryption-footer>
</ion-content>

<ion-footer class="mine-home-footer" [keyboardAttach]="content">
  <button ion-button
          full
          [disabled]="!idInfo"
          (click)="executeSave()"
          color="default"
  >保存</button>
</ion-footer>
